package com.hzncc.flowable_diboot.delivery.vo;

import com.diboot.core.binding.annotation.BindEntity;
import com.diboot.core.binding.annotation.BindEntityList;
import com.hzncc.flowable_diboot.contract.entity.SalesContract;
import com.hzncc.flowable_diboot.contract.entity.SalesContractExt;
import com.hzncc.flowable_diboot.contract.vo.SalesContractDetailVO;
import com.hzncc.flowable_diboot.contract.vo.SalesContractVO;
import com.hzncc.flowable_diboot.delivery.entity.DeliveryDetail;
import com.hzncc.flowable_diboot.delivery.entity.DeliveryInfo;
import com.hzncc.flowable_diboot.delivery.entity.DeliveryProduct;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;

@Getter
@Setter
@Accessors(chain = true)
public class DeliveryRegisterVO extends DeliveryRegisterDetailVO{

    private static final long serialVersionUID = 1533834933941128375L;

    /**
     * 批量补充ID
     */
    List<String> batchIds;

    /**
     * 发货登记项目信息
     */
    @BindEntity(entity = DeliveryProduct.class,condition = "this.delivery_code = delivery_code",deepBind = true)
    DeliveryProductDetailVO product;

//    /**
//     * 发货信息
//     */
//    @BindEntity(entity = DeliveryInfo.class,condition = "this.delivery_code = delivery_code",deepBind = true)
//    DeliveryInfoDetailVO info;

//    /**
//     * sap合同信息
//     */
//    @BindEntity(entity = SalesContract.class,condition = "this.sap_contract_code = sap_code",deepBind = true)
//    SalesContractVO salesContract;

    /**
     * 发货明细信息
     */
    @BindEntityList(entity = DeliveryDetail.class,condition = "this.delivery_code = delivery_code and type = '1' and this.register_type = register_type",deepBind = true)
    List<DeliveryDetailDetailVO> deliveryDetail;

    /**
     * 缺货明细信息
     */
    @BindEntityList(entity = DeliveryDetail.class,condition = "this.delivery_code = delivery_code and type = '2' and this.register_type = register_type",deepBind = true)
    List<DeliveryDetailDetailVO> outDeliveryDetail;

}
